import java.util.Scanner;

/**
 * @author vivi
 * @description
 * @date 2024/4/25
 */
public class demo2 {
    //斐波那契数列
    public static void main (String[] args) {
        Scanner scanner = new Scanner(System.in);
        int stair = scanner.nextInt();

        int a = 1;
        int b = 1;
        int c = 0;
        for (int i = 2; i <= stair; i++) {
            c = a + b;
            a = b;
            b = c;

        }
        if(stair == 0 || stair == 1){
            System.out.println(stair);
        }else {
            System.out.println(c);
        }
    }
}
